<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>溢出隐藏</title>
    <style>
    *{
        margin: 0;
        padding: 0;
    }
    .wrap{
        width: 1200px;
        height: 300px;
        background: red;
        margin: 0 auto;
        overflow: hidden;
    }
    li{
        list-style: none;
    }
    ul{
        width: 1250px;
        background: rgb(245, 41, 109);
    }
    ul:after{
        content: "";
        display: block;
        clear: both;
    }
    ul li{
        width: 200px;
        height: 200px;
        background: rgb(244, 33, 226);
        float: left;
        margin-right: 50px;
    }
    </style>
</head>
<body>
    <div class="wrap">
        <ul>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>
</body>
</html>